<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*,java.util.*,vo.*,utils.*,impl.*" errorPage="" %>
<%
boolean persist=true;
if(request.getParameter("persist")!=null)persist=true;
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>客户目录(产品)</title>
<LINK rel="stylesheet" href="/css/arg.css" type="text/css">
<style type="text/css">
		@import "/dojo/dijit/themes/tundra/tundra.css";		
	</style>

	<script type="text/javascript" src="/dojo/dojo/dojo.js"
		djConfig="parseOnLoad: true, isDebug: false"></script>
	
	<script language="JavaScript" type="text/javascript">
		dojo.require("dojo.data.ItemFileReadStore");
		dojo.require("dijit.Tree");
		dojo.require("holly.tree.LazyLoadJSIStore");
		dojo.require("dojo.parser");	// scan page for widgets and instantiate them
	</script>
<SCRIPT language="javascript" src="/script/tools_1.js"></SCRIPT>

<script>
function check(){
}
</script>
</head>

<body class="tundra" topmargin="0" leftmargin="0">
<form name="form1" method="post" action="" onsubmit="return false;">
<script>
	createTitle("客户目录(产品)");
</script>
<table width="100%" height="100%" border="0" cellpadding="3" cellspacing="0" class="border">
  <tr>    
    <td class="table_content" >
	
	<div dojoType="holly.tree.LazyLoadJSIStore"
        url="/TreeAction.sn?cmd=showCustomerTreeByPC" jsid="continentStore"></div>
				
				<div dojoType="dijit.Tree" id="mytree" store="continentStore" query="{type:'root'}" label="根目录" persist="<%=persist?"true":"false"%>">
					<script type="dojo/method" event="onClick" args="item">
						if(item){
							if(item!=null&&continentStore.getValue(item,"leaf")=="1"){
							//	try{
									//alert(continentStore.getValue(item,"objectId").substring(2));
									//openwin("/CustomerAction.sn?cmd=getCustomer&id="+continentStore.getValue(item,"objectId").substring(2),"customer",50,50,700,550);
									id=continentStore.getValue(item,"objectId").split("_")[2];
									window.location="/CustomerAction.sn?cmd=getCustomer&id="+id;
							//	}catch(e){}
							}
						}else{
							//alert("Execute on root node");
						}
					</script>
					<script type="dojo/method" event="mayHaveChildren" args="item">
						try{
							if(continentStore.getValue(item,"leaf")=="1")						
								return false;
							else
								return true;
						}catch(e){}
					</script>					
				</div>
	
    </td>	
</table>
</form>
</body>
</html>
